<ion-view view-title="商品发布" class="productmanager_publish">
	<ion-content>
		<div class="list">
			<li class="item padding-0">
				<div class="row text-center font-large-my">
					<div class="col border-radius-my bian_red" ng-class="{'assertive-bg light':productType=='new'}" on-tap="changProductType('new')">全新</div>&nbsp;
					<div class="col border-radius-my bian_red" ng-class="{'assertive-bg light':productType=='second'}" on-tap="changProductType('second')">二手</div>&nbsp;
					<div class="col border-radius-my bian_red" ng-class="{'assertive-bg light':productType=='unsalable'}" on-tap="changProductType('unsalable')">滞销</div>&nbsp;
					<div class="col border-radius-my bian_red" ng-class="{'assertive-bg light':productType=='rent'}" on-tap="changProductType('rent')">租赁</div>&nbsp;
					<div class="col border-radius-my bian_red" ng-class="{'assertive-bg light':productType=='parts'}" on-tap="changProductType('parts')">配件</div>&nbsp;
					<div class="col border-radius-my bian_red" on-tap="onshow_transfer_publish()">转让</div>
				</div>
			</li>
			<li class="item positive-bg padding-0">
				<div class="light-bg margin-left-10-my padding-10">
					宝贝基本信息 <span class="positive font-large-my right-zhang" on-tap="openModal_manufactor()">旗舰店检索+(临时)</span>
				</div>
			</li>
	<!--111111111111-->
	<div >
			<li class="item item-input item-select" ng-if="productType!='parts'&&productType!='rent'">
				品牌：
				<div class="input-value" ng-click="doSelectbrand()" style="padding-right: 30px;">{{input.brand.name}}</div>
			</li>
			<li class="item item-input">
				分类：
				<div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
				<div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
				<div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
			</li>

			<li class="item item-input">
				<span class="input-label">
					商品名称
				</span>
				<input type="text" placeholder="请输入商品名称" ng-model="productModel.name" />
			</li>
			<li class="item item-input">
				<span class="input-label">
				商品编码
			</span>
				<input type="text" placeholder="请输入商品编码" ng-model="productModel.bn" />
			</li>
			<li class="item item-borderless font-small-my padding-0" style="padding-right: 10px;">
				<span class="right-zhang font-gray-my">如没有指定的商品编码，此处可不填</span>
			</li>
			<li class="item item-input" ng-repeat="property in propertys">
				<span class="input-label">
					<span ng-class="{'invisible':$index>0}">商品属性&nbsp;&nbsp;&nbsp;</span><span class="font-large-my">{{property.name}}</span>
				</span>
				<input type="radio" id="radio[{{$index}}]" value="{{property.id}}" style="display: none;"/>
				<input type="text" placeholder="请输入商品{{property.name}}" ng-model="proArray[$index]" />
			</li>
			<li class="item item-input">
				商品关键词
				<textarea rows="3" class="padding-left" placeholder="请输入商品关键词" ng-model="productModel.keywords"></textarea>
			</li>
			<li class="item item-borderless font-small-my padding-0" style="padding-right: 10px;">
				<span class="right-zhang  font-gray-my">多个关键词用"|"隔开</span>
			</li>
			<li class="item item-input">
				商品简介
				<textarea rows="5" ng-model="productModel.brief" class="padding-left" placeholder="请输入商品简介"></textarea>
				<span class="assertive aglinRightBottom_zhang padding-left">{{textLength}}/70</span>
			</li>
			<li class="item item-input">
				<span class="input-label">商品图片</span>
				<!--<div class="add input-file" on-tap="doShowFile()">
					<span class="icon ion-plus"></span>
				</div>-->
				<a class="add input-file" href="javascript:void(0);"><span class="icon ion-plus" on-tap="addStoreImg()"></span></a>
			</li>
			<li class="item item-borderless font-small-my padding-0" style="padding-right: 10px;">
				<span class="right-zhang  font-gray-my">800*800，大小不能超过1M</span>
			</li>
			<li class="item padding-0">
				<div ng-repeat="img in input.uploads track by $index">
					<div class="imageShow">
						<i class="icon ion-close-circled delImage" on-tap="ondelete($index)"></i>
						<img ng-src='{{img.url}}' on-tap="openFileActSheet($index)"/>
					</div>
					<div ng-class="{'clear_zhang':($index+1)%4==0}"></div>
				</div>
			</li>
	<!--111111111111111-->
	</div>

<!--隐藏的商品规格-->
			<li class="item positive-bg padding-0">
				<div class="light-bg margin-left-10-my padding-10" on-tap="formatToggle()">
					商品规格
					<i class="right-zhang icon ion-chevron-down positive" ng-show="!isShowFormat"></i>
		 			<i class="right-zhang icon ion-chevron-up positive" ng-show="isShowFormat"></i>
				</div>
			</li>

			<div ><!--收起/展开ng-show="isShowFormat"-->
				<li class="item padding-10" ng-repeat="s in specifications">
					<span class="royal">{{s.type_name}}</span>
					<div class="right-zhang font-large-my font-gray-my">
						<input type="checkbox" id="gg{{$index}}" ng-click="checkAll_guige($event)"/>
						<label for="gg{{$index}}">全选</label>
					</div>
					<div class="clear_zhang"></div>
					<div class="left-zhang text-center padding-5  font-large-my" style="width: 33.3%;" ng-repeat="text in s.value">
						<input type="checkbox" class="radio_size_zhang ggBoxs" value="{{text.id+','+text.name}}" id="{{$parent.$index+''+$index}}"  ng-click="getGuiGeValue();a($parent.$index,$index)"/>
						<label for="{{$parent.$index+''+$index}}">{{text.name}}</label>
				    </div>
				</li>

				<li class="item padding-0">
					<div class="row padding-0 text-center font-large-my">
						<div class="col col-30">规格</div>
						<div class="col">规格值</div>
						<div class="col">关联商品图册</div>
						<div class="col col-20">操作</div>
					</div>
				</li>
				<li class="item padding-0" ng-repeat="g in guiGe track by $index">
					<div class="row text-center padding-0 font-large-my" style="line-height: 34px;">
						<div class="col col-30">{{g.name}}</div>
						<div class="col"><input type="text" style="width: 100%;color: #f60;" class="text-center stable-bg" placeholder="规格值"/></div>
						<div class="col"><img src="img/upload/pro-img01.jpg" width="25%" /></div>
						<div class="col col-20"><i class="icon ion-ios-close-outline assertive font-1rem-my"></i></div>
					</div>
				</li>
				<li class="item padding-0">
					<div class="button-bar padding ">
						<button class="button button-small button-assertive font-large-my">生成所有商品</button>
						<button class="button button-small button-positive col-offset-10 font-large-my">追加一个商品</button>
					</div>
				</li>
				<li class="item item-input">
					共两件商品
				</li>
				<li class="item padding-5">
					<div class="padding-5">
						<span class="left-zhang font-middle-my">货号：</span>
						<input type="text" class="stable-bg guige_input font-middle-my" placeholder="货号" style="width:50%;"/>
					</div>
					<div class="padding-5">
						<span class="font-middle-my left-zhang">库存：</span>
						<input type="text" placeholder="库存" class="stable-bg guige_input font-middle-my left-zhang"/>
						<input type="text" placeholder="销售价" class="stable-bg guige_input font-middle-my right-zhang"/>
						<span class="right-zhang font-middle-my">销售价(元)：</span>
						<div class="clear_zhang"></div>
					</div>
					<div class="padding-5">
						<span class="font-middle-my left-zhang">重量：</span>
						<input type="text" placeholder="重量(kg)" class="stable-bg guige_input font-middle-my left-zhang"/>
						<input type="text" placeholder="市场价" class="stable-bg guige_input font-middle-my right-zhang"/>
						<span class="right-zhang font-middle-my">市场价(元)：</span>
						<div class="clear_zhang"></div>
					</div>
				</li>
				<!--<ion-checkbox class="padding-5" ng-repeat="num in [1,2,3]">
					<p>型号：xxx型号 <span class="margin-left-10-my">规格：1500cm</span></p>
					<p>库存：150件<span class="margin-left-10-my">销售价：150</span><span class="margin-left-10-my">市场价：200</span></p>
				</ion-checkbox>-->

				<li class="item item-input-inset padding-5">
					<label class="checkbox checkbox-square padding-0">
				   	  	<input type="checkbox" id="allgs"/>
				   	</label><label for="allgs">全选</label>
					<span class="margin-left-10-my font-small-my assertive bian_red border-radius-my" style="padding: 0 10px;">删除</span>
				</li>
			</div>	<!--收起/展开-->


			<!--第三部分-->
			<li class="item item-input">
				<span class="input-label">
				运费模板
			</span>
			<div class="input-value" ng-click="doSelectdlytype()">{{productModel.dlytype_select.name}}</div>
			</li>
			<li class="item item-toggle">
				是否包邮
				<label class="toggle toggle-positive">
		            <input type="checkbox" ng-model="productModel.is_freepost">
		            <div class="track">
		               <div class="handle"></div>
		            </div>
          		</label>
			</li>
			<li class="item item-toggle">
				立即上架
				<label class="toggle toggle-positive">
             <input type="checkbox" ng-model="productModel.is_marketable">
             <div class="track">
               <div class="handle"></div>
             </div>
           </label>
			</li>
			<li class="item item-toggle">
				无库存是否可销售
				<label class="toggle toggle-positive">
             <input type="checkbox" ng-model="productModel.is_salewithoutstore">
             <div class="track">
               <div class="handle"></div>
             </div>
           </label>
			</li>
			<li class="item item-input">
				<span class="input-label">
					自定义分类
				</span>
				<div class="input-value" ng-click="doSelectCustomType()">{{productModel.cat_list_select.name}}</div>
			</li>

			<li class="item positive-bg padding-0">
				<div class="light-bg margin-left-10-my padding-10" on-tap="formatToggle2()">
					配件
					<i class="right-zhang icon ion-chevron-down positive" ng-show="!isShowFormat2"></i>
		 			<i class="right-zhang icon ion-chevron-up positive" ng-show="isShowFormat2"></i>
				</div>
			</li>
<!--隐藏的配件-->
		<div ng-show="isShowFormat2"><!--收起/展开-->
			<li class="item padding-5 item-icon-right">
				配件组名称：XXXXXX配件
				<i class="icon ion-ios-close-outline assertive font-1rem-my"></i>
			</li>
			<li class="item item-input">
				<span class="input-label">
				最小购买量
			</span>
				<input type="text" placeholder="请输入最小购买量" />
			</li>
			<li class="item item-input">
				<span class="input-label">
				最大购买量
			</span>
				<input type="text" placeholder="请输入最大购买量" />
			</li>

			<li class="item item-input-inset">
				<span class="input-label">
				配件优惠
			</span>
				<label class="checkbox padding-0 checkbox-square">
				<input type="checkbox"  />
			</label>折扣优惠&nbsp;
				<label class="checkbox padding-0 checkbox-square">
				<input type="checkbox"  />
			</label>金额优惠
			</li>
			<li class="item item-input">
				<span class="input-label">
				优惠额度
			</span>
				<input type="text" placeholder="请输入配件的优惠额度" style="border-bottom: 1px solid #D9D9D9;" />
			</li>
			<li class="item item-borderless font-small-my padding-0" style="padding-right: 10px;">
				<span class="right-zhang">无优惠可不填，打9折就填0.9，优惠100元就填100</span>
			</li>
			<li class="item item-input">
				<span class="input-label">配件商品</span>
				 <span class="positive font-large-my" on-tap="openModal()">添加+</span>
			</li>
		</div>
	<!--收起/展开--end--配件-->

			<li class="item positive-bg padding-0 item-icon-right">
				<div class="light-bg margin-left-10-my padding-10">
					相关商品
					<i class="icon ion-plus-circled positive" on-tap="onshow_searchpro_common()"></i>
				</div>
			</li>
			<li class="item item-icon-right">
				商品选择：电动类工具扳手家用型
				<i class="icon ion-ios-close-outline assertive font-1rem-my"></i>
			</li>

			<li class="item positive-bg padding-0">
				<div class="light-bg margin-left-10-my padding-10">
					SEO设置
				</div>
			</li>
			<li class="item item-input">
				keywords
				<textarea rows="3" class="padding-left" placeholder="请输入keywords" ng-model="productModel.meta_keyword"></textarea>
			</li>
			<li class="item item-input">
				description
				<textarea rows="5" class="padding-left" placeholder="请输入description" ng-model="productModel.meta_describe"></textarea>
			</li>
		</div>

		<div class="button-bar padding">
			<button class="button  button-assertive">取消</button>
			<button class="button  button-positive col-offset-10" on-tap="edit()">保存</button>
		</div>

	</ion-content>
</ion-view>